@layout("/common/_form.html",{js:["/assets/category/category_edit.js"]}){

<form class="layui-form" id="categoryForm" lay-filter="categoryForm">
    <div class="layui-fluid" style="padding-bottom: 75px;">
        <div class="layui-card">
            <div class="layui-card-header">基本信息</div>
            <div class="layui-card-body">
                <div class="layui-form-item layui-row">
                    <input name="id" type="hidden"/>

                    <div class="layui-inline layui-col-md3">
                        <label class="layui-form-label"><span style="color: red;">*</span>名称</label>
                        <div class="layui-input-block">
                            <input id="name" name="name" placeholder="请输入" type="text" class="layui-input" lay-verify="required" required/>
                        </div>
                    </div>

                    <div class="layui-form-item layui-col-md3">
                        <label class="layui-form-label">上级分类<span style="color: red;">*</span></label>
                        <div class="layui-input-block">
                            <select id="pid" name="pid"    lay-verify="required" lay-search="">
                                <option value="0" >顶级</option>
                                @for(obj in category){
                                <option value="${obj.id}" >${obj.name}</option>
                                @}
                            </select>

                        </div>
                    </div>

                    <div class="layui-inline layui-col-md3" style="clear:both;margin-top: 43px">
                        <label class="layui-form-label"><span style="color: red;">*</span>排序</label>
                        <div class="layui-input-block">
                            <input id="sort" name="sort" placeholder="请输入排序，越大越靠前" type="text" class="layui-input" lay-verify="required" required/>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="form-group-bottom text-center">
        <button class="layui-btn" lay-filter="btnSubmit" lay-submit>&emsp;提交&emsp;</button>
        <button type="reset" class="layui-btn layui-btn-primary" id="cancel">&emsp;取消&emsp;</button>
    </div>

</form>

@}